package com.rd.student.jiaji.class4.suyan.zrrd.day10;

public class Addition {
    public int twoSum(int a,int b){
        return a+b;
    }
    public byte twoSum(byte a, byte b){
        return (byte)(a+b);
    }
    public short twoSum(short a,short b){
        return (short)(a+b);
    }
    public long twoSum(long a,long b){
        return (long)(a+b);
    }
    public float twoSum(float a,float b){
        return (float)(a+b);
    }
    public double twoSum(double a,double b){
        return (double) (a+b);
    }

    public static void main(String[] args) {
        Addition addition=new Addition();

        System.out.println(addition.twoSum(1,2));
        System.out.println(addition.twoSum((byte)2,(byte)3));
        System.out.println(addition.twoSum((short)3,(short)4));
        System.out.println(addition.twoSum((long)6,(long)5));
        System.out.println(addition.twoSum((float)0.1,(float)0.2));
        System.out.println(addition.twoSum((double)0.1,(double)0.2));
    }

}

